Skip to content

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented May 20, 2025

Motivation

Closes: #10564

Considering 0.8.30+ ships with prague enabled we should pro-actively move to using it by default.

Solution

Adds Prague activation timestamp, fix blob_fee and blob_params to be hardfork compatible

Anvil already has prague activated per #10653

Breaking changes

Users targeting older versions (< 0.8.30) will likely experience a breaking change similar to how we've had this when we introduced cancun as a default if they don't have an evm_version specified in foundry.toml.

Follow up

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@zerosnacks zerosnacks added T-likely-breaking Type: requires changes that can be breaking T-to-discuss Type: requires discussion labels May 20, 2025
@zerosnacks zerosnacks added this to the v1.3.0 milestone May 20, 2025
@zerosnacks zerosnacks changed the title chore: activate prague hardfork by default chore: activate prague hardfork by default and use 0.8.30 for tests May 20, 2025
@zerosnacks zerosnacks moved this to In Progress in Foundry May 20, 2025
function test_Increment_In_Counter_With_Salt() public {
CounterWithSalt counter = new CounterWithSalt{value: 111, salt: bytes32("preprocess_counter_with_salt")}(1);
assertEq(address(counter), 0x3Efe9ecFc73fB3baB7ECafBB40D3e134260Be6AB);
assertEq(address(counter), 0x223e63BE3BF01DD04f852d70f1bE217017055f49);
Copy link
Member Author

@zerosnacks zerosnacks May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can be explained by differences in bytecode (like evm version) - we should make this test more robust instead of changing the address but can be done as a follow-up imo. The places where the strict assertions against the addresses are done largely make sense.

@zerosnacks zerosnacks removed the T-to-discuss Type: requires discussion label May 28, 2025
zerosnacks added a commit to foundry-rs/compilers that referenced this pull request May 28, 2025
@zerosnacks zerosnacks marked this pull request as ready for review May 28, 2025 16:57
@zerosnacks zerosnacks changed the title chore: activate prague hardfork by default and use 0.8.30 for tests chore: activate prague hardfork and Solidity version 0.8.30 as default May 28, 2025
@zerosnacks zerosnacks moved this from In Progress to Ready For Review in Foundry May 28, 2025
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smol nit

@zerosnacks zerosnacks requested a review from mattsse June 2, 2025 09:00
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, left small nit

.normalize_version_solc(version)
.unwrap_or_default(),
)
let evm = EvmVersion::default()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe can be simplified, or for future have a normalize_evm_version(version, language) in foundry compilers?

                        let mut evm = EvmVersion::default()
                            .normalize_version_solc(version)
                            .unwrap_or_default();
                        // Vyper does not yet support Prague, so we normalize it to Cancun.
                        if language.is_vyper() {
                            evm = normalize_evm_version_vyper(evm);
                        }
                        Some(evm)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, opened a follow-up ticket for me here: foundry-rs/compilers#278

We should either upstream this Vyper exception as is or create a unified helper as proposed

@zerosnacks zerosnacks merged commit 665fc04 into master Jun 3, 2025
22 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/chore-activate-prague-hardfork branch June 3, 2025 08:40
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Foundry Jun 3, 2025
alexandergrey33 added a commit to alexandergrey33/compilers that referenced this pull request Sep 17, 2025
bug-knightxmiu70 added a commit to bug-knightxmiu70/compilers that referenced this pull request Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-likely-breaking Type: requires changes that can be breaking
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

chore: mark prague hardfork as latest and select it by default
4 participants